<?php

use yii\db\Migration;
use yii\db\Schema;

class m170809_031823_CREATE_TABLE_CARD_AREA extends Migration
{
    public function up()
    {

        $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
        // 游轮基础信息
        $this->createTable('card', [
            "id" =>         Schema::TYPE_PK,
            "card" 		=>  Schema::TYPE_INTEGER.   "(6) DEFAULT  '0' COMMENT '载客人数 人'",
            "area" 		=>  Schema::TYPE_STRING.    "(128) NULL COMMENT '地区名称'",
        ], $tableOptions);
    }

    public function down()
    {
        echo "m170809_031823_CREATE_TABLE_CARD_AREA cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
